var OSS = require('ali-oss');
// import { getAliossParams } from '../api/alioosRequest.js';

// var region = ''
// var accessKeyId = ''
// var accessKeySecret = ''
// var bucket = ''

// getAliossParams().then(res=>{
//   // console.log(res);
//   accessKeyId = res.data.data.accesskeyid;
//   region = res.data.data.region;
//   accessKeySecret = res.data.data.accesskeysecret;
//   bucket = res.data.data.bucket;
// })

// export function client() {
//   var client = new OSS({
//     region: region,
//     accessKeyId: accessKeyId,
//     accessKeySecret: accessKeySecret,
//     bucket: bucket
//   })  //后端提供数据
//   return client
// }

export function client() {
  var client = new OSS({
    region: 'oss-cn-chengdu',
    accessKeyId: 'LTAI5tL5QX8iTZ414XVJFjXe',
    accessKeySecret: 'vwhgwjG5ViucNjxtUS3SKk20hlAsny',
    bucket: 'myblog-mycaveolae'
  })  //后端提供数据
  return client
}
